import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/page/Login'
import Index from '@/page/Index'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Login',
      component: Login
    },
    {

      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/module',
      children: [{
        path: '/sys/module',
        name: 'module',
        component: () => import('@/page/system_manager/ModuleManager'),
        meta: {
          title: '模块管理'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/role',
      children: [{
        path: '/sys/role',
        name: 'role',
        component: () => import('@/page/system_manager/RoleManager'),
        meta: {
          title: '角色管理'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/CAdd',
      children: [{
        path: '/sys/CAdd',
        name: 'CAdd',
        component: () => import('@/Customer/CustomerAdd'),
        meta: {
          title: '客户添加'
        }
      }, ]
    } ,{
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/CShow',
      children: [{
        path: '/sys/CShow',
        name: 'CShow',
        component: () => import('@/Customer/CustomerShow'),
        meta: {
          title: '客户显示'
        }
      }, ]
    } ,{
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/CPerson',
      children: [{
        path: '/sys/CPerson',
        name: 'CPerson',
        component: () => import('@/Customer/CustomerPerson'),
        meta: {
          title: '联系人信息'
        }
      }, ]
    } ,{
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/CBian',
      children: [{
        path: '/sys/CBian',
        name: 'CBian',
        component: () => import('@/Customer/CustomerBian'),
        meta: {
          title: '客户编辑'
        }
      }, ]
    } ,{
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/CUpdate',
      children: [{
        path: '/sys/CUpdate',
        name: 'CUpdate',
        component: () => import('@/Customer/CustomerUpdate'),
        meta: {
          title: '客户查看'
        }
      }, ]
    } ,{
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/COAdd',
      children: [{
        path: '/sys/COAdd',
        name: 'COAdd',
        component: () => import('@/Contract/ContractAdd'),
        meta: {
          title: '合同录入'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/COShow',
      children: [{
        path: '/sys/COShow',
        name: 'COShow',
        component: () => import('@/Contract/ContractShow'),
        meta: {
          title: '合同显示'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/COFan',
      children: [{
        path: '/sys/COFan',
        name: 'COFan',
        component: () => import('@/Contract/ContractFan'),
        meta: {
          title: '合同查看'
        }
      }, ]
    } ,

    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/COUpdate',
      children: [{
        path: '/sys/COUpdate',
        name: 'COUpdate',
        component: () => import('@/Contract/ContractUpdate'),
        meta: {
          title: '合同编辑'
        }
      }, ]
    } ,

    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/COEdit',
      children: [{
        path: '/sys/COEdit',
        name: 'COEdit',
        component: () => import('@/Contract/Edit'),
        meta: {
          title: '合同编辑'
        }
      }, ]
    } ,

    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/COH',
      children: [{
        path: '/sys/COH',
        name: 'COH',
        component: () => import('@/Contract/HelloWorld'),
        meta: {
          title: '合同编辑'
        }
      }, ]
    } ,

    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/Opeadd',
      children: [{
        path: '/sys/Opeadd',
        name: 'Opeadd',
        component: () => import('@/Operation/Operationadd'),
        meta: {
          title: '项目立项'
        }
      }, ]
    } ,







    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/adminuser',
      children: [{
        path: '/sys/adminuser',
        name: 'adminuser',
        component: () => import('@/page/system_manager/AdminUserManager'),
        meta: {
          title: '用户管理'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/wsm',
      children: [{
        path: '/sys/wsm',
        name: 'wsm',
        component: () => import('@/page/system_manager/WebSystemMenuManager'),
        meta: {
          title: '菜单管理'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/dic_tab',
      children: [{
        path: '/sys/dic_tab',
        name: 'dic_tab',
        component: () => import('@/page/system_settings/DictionaryTable'),
        meta: {
          title: '字典设置'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/dic_type_tab',
      children: [{
        path: '/sys/dic_type_tab',
        name: 'dic_type_tab',
        component: () => import('@/page/system_settings/DictionaryTypeTable'),
        meta: {
          title: '字典管理'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/dic_test',
      children: [{
        path: '/sys/dic_test',
        name: 'dic_test',
        component: () => import('@/components/system_manager/DictionaryTest'),
        meta: {
          title: '字典组件测试'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/arc_tit_set',
      children: [{
        path: '/sys/arc_tit_set',
        name: 'arc_tit_set',
        component: () => import('@/page/system_settings/ArcTitltSetting'),
        meta: {
          title: '字典组件测试'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/dep_manager',
      children: [{
        path: '/sys/dep_manager',
        name: 'dep_manager',
        component: () => import('@/page/system_settings/DepartmentManager'),
        meta: {
          title: '部门管理测试'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/per_manager',
      children: [{
        path: '/sys/per_manager',
        name: 'per_manager',
        component: () => import('@/page/system_settings/PersonnelManager'),
        meta: {
          title: '人员管理'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/qua_manager',
      children: [{
        path: '/sys/qua_manager',
        name: 'qua_manager',
        component: () => import('@/page/system_settings/QualificationManagement'),
        meta: {
          title: '资质管理'
        }
      }, ]
    },


    ,//////////////////////////////////--宋占广的路径
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/calendar_hyperlink',
      children: [{
        path: '/sys/calendar_hyperlink',
        name: 'calendar_hyperlink',
        component: () => import('@/AttendanceManagement/calendar_hyperlink'),
        meta: {
          title: '考勤申请'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/attendance_apply',
      children: [{
        path: '/sys/attendance_apply',
        name: 'attendance_apply',
        component: () => import('@/AttendanceManagement/attendance_apply'),
        meta: {
          title: '考勤申请添加'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/company_activities_list',
      children: [{
        path: '/sys/company_activities_list',
        name: 'company_activities_list',
        component: () => import('@/AttendanceManagement/company_activities_list'),
        meta: {
          title: '公司活动申请列表'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/department_activity_list',
      children: [{
        path: '/sys/department_activity_list',
        name: 'department_activity_list',
        component: () => import('@/AttendanceManagement/department_activity_list'),
        meta: {
          title: '部门活动申请列表'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/field_application_list',
      children: [{
        path: '/sys/field_application_list',
        name: 'field_application_list',
        component: () => import('@/AttendanceManagement/field_application_list'),
        meta: {
          title: '外勤申请列表'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/leave_application_list',
      children: [{
        path: '/sys/leave_application_list',
        name: 'leave_application_list',
        component: () => import('@/AttendanceManagement/leave_application_list'),
        meta: {
          title: '请假申请列表'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/not_clock_list',
      children: [{
        path: '/sys/not_clock_list',
        name: 'not_clock_list',
        component: () => import('@/AttendanceManagement/not_clock_list'),
        meta: {
          title: '未打卡申请列表'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/overtime_leave_list',
      children: [{
        path: '/sys/overtime_leave_list',
        name: 'overtime_leave_list',
        component: () => import('@/AttendanceManagement/overtime_leave_list'),
        meta: {
          title: '加班离岗申请列表'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/travel_application_list',
      children: [{
        path: '/sys/travel_application_list',
        name: 'travel_application_list',
        component: () => import('@/AttendanceManagement/travel_application_list'),
        meta: {
          title: '出差申请列表'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/attendance_statistics',
      children: [{
        path: '/sys/attendance_statistics',
        name: 'attendance_statistics',
        component: () => import('@/AttendanceManagement/attendance_statistics'),
        meta: {
          title: '考勤统计'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/attendance_apply_edit',
      children: [{
        path: '/sys/attendance_apply_edit/:id/:type_name',
        name: 'attendance_apply_edit',
        component: () => import('@/AttendanceManagement/attendance_apply_edit'),
        meta: {
          title: '考勤申请反填'
        }
      }, ]
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/annual_leave_statistics',
      children: [{
        path: '/sys/annual_leave_statistics',
        name: 'annual_leave_statistics',
        component: () => import('@/AttendanceManagement/annual_leave_statistics'),
        meta: {
          title: '年假统计'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/department_overtime_management',
      children: [{
        path: '/sys/department_overtime_management',
        name: 'department_overtime_management',
        component: () => import('@/AttendanceManagement/department_overtime_management'),
        meta: {
          title: '部门加班费管理'
        }
      }, ]
    }   ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/department_manager_overtime_pay_management',
      children: [{
        path: '/sys/department_manager_overtime_pay_management',
        name: 'department_manager_overtime_pay_management',
        component: () => import('@/AttendanceManagement/department_manager_overtime_pay_management'),
        meta: {
          title: '部门经理加班费管理'
        }
      }, ]
    }   ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/employee_attendance_settings',
      children: [{
        path: '/sys/employee_attendance_settings',
        name: 'employee_attendance_settings',
        component: () => import('@/AttendanceManagement/employee_attendance_settings'),
        meta: {
          title: '部门经理加班费管理'
        }
      }, ]
    }   ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/department_list',
      children: [{
        path: '/sys/department_list',
        name: 'department_list',
        component: () => import('@/AttendanceManagement/department_list'),
        meta: {
          title: '部门经理设置'
        }
      }, ]
    }   ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/holiday_settings',
      children: [{
        path: '/sys/holiday_settings',
        name: 'holiday_settings',
        component: () => import('@/AttendanceManagement/holiday_settings'),
        meta: {
          title: '节假日设置'
        }
      }, ]
    } ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/upload_attendance',
      children: [{
        path: '/sys/upload_attendance',
        name: 'upload_attendance',
        component: () => import('@/AttendanceManagement/upload_attendance'),
        meta: {
          title: '上传考勤'
        }
      }, ]
    }     ,
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/comprehensive_statistics_contracts_projects',
      children: [{
        path: '/sys/comprehensive_statistics_contracts_projects',
        name: 'comprehensive_statistics_contracts_projects',
        component: () => import('@/AttendanceManagement/comprehensive_statistics_contracts_projects'),
        meta: {
          title: '合同与项目综合统计'
        }
      }, ]
    }     
  ]
})
